package cn.wolfcode.luowowo.repository;

import cn.wolfcode.luowowo.domain.UserInfo;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserInfoRepository extends MongoRepository<UserInfo, String> {

    /**
     * 通过号码查询用户信息
     *
     * @param phone
     * @return
     */
    UserInfo findByPhone(String phone);

    UserInfo getByPhoneAndPassword(String username, String password);

    //通过目的地名字查询用户信息
    List<UserInfo> findByCity(String city);
}
